package cn.huiyunche.base.service.enums;

/**
 * @ClassName: MessageClassificationEnum
 * @Description: 消息类别
 * @author: Aaron
 * @date: 2016年5月30日 下午1:40:51
 */
public enum MessageClassificationEnum {
    ORDER(10, "订单类"),
    NOTICE(20, "公告类");

    private final int value;
    private final String text;

    MessageClassificationEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public String getText() {
        return text;
    }

    public static MessageClassificationEnum getByValue(int value) {
        for (MessageClassificationEnum temp : MessageClassificationEnum.values()) {
            if (temp.getValue() == value) {
                return temp;
            }
        }
        return null;
    }
}
